package com.tyoj.tyojbackendquestionservice.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tyoj.model.dto.postthumb.QuestionThumbAddRequest;
import com.tyoj.model.dto.questionSubmit.QuestionSubmitQueryRequest;
import com.tyoj.model.entity.QuestionThumb;
import com.tyoj.model.entity.User;
import com.tyoj.model.vo.QuestionSubmmitVO;

/**
 * @author WangJiyou
 * @description 针对表【question_thumb(题目提交)】的数据库操作Service
 * @createDate 2024-06-06 11:14:32
 */
public interface QuestionThumbService extends IService<QuestionThumb> {
    /**
     * 点赞
     *
     * @param questionThumbAddRequest
     * @param loginUser
     * @return
     */
    Long doQuestionThumb(QuestionThumbAddRequest questionThumbAddRequest, User loginUser);

    /**
     * 帖子点赞（内部服务）
     *
     * @param userId
     * @return
     */
    int doQuestionThumbInner(long userId, QuestionThumbAddRequest questionThumbAddRequest);

    QueryWrapper<QuestionThumb> getQueryWrapper(QuestionSubmitQueryRequest questionSubmitQueryRequest, User userLogin);


    QuestionSubmmitVO getQuestionSubmmitVo(QuestionThumb questionThumb, User loginUser);
}
